#!/bin/bash

# This script requires coverage.py to be installed.
# The source code can be found at http://nedbatchelder.com/code/coverage
# Install using 'easy_install coverage' on the commandline

cd ../test

coverage -ex all_tests.py 2> ../scripts/.test_results
coverage -rm -o /usr/share/pyshared,/usr/lib/python2.6/,/usr/local/lib/python2.6 > ../scripts/.coverage_results

cd ../scripts

echo '----------------------------------------------------------------------'
echo 'spoc Test Coverage Statistics'

tail -n 4 .test_results

echo ''

cat .coverage_results
